package com.redstar.interesting.common.starter.transaction;

import org.springframework.transaction.support.TransactionSynchronizationManager;

/**
 * @author lihongxing
 */
public class TransactionUtil {

    public static void doAfterTransaction(DoTransactionCompletion doTransactionCompletion) {
        if (TransactionSynchronizationManager.isActualTransactionActive()) {
            TransactionSynchronizationManager.registerSynchronization(doTransactionCompletion);
        }
    }
}
